﻿@{
    Layout = "~/Views/Shared/_Main.cshtml";
}
<div class="container">
    <div class="row">
        <div class="span9">
            <!-- navagation -->
            <ul class="breadcrumb">
                <li><a href="/">首页</a> <span class="divider">/</span></li>
                <li class="active">用户登录</li>
            </ul>
            <div class="row">
                <div class="span9 pull-left">
                    <hr />
                    <fieldset>
                        <form id="loginform" action="/account/login" class="form-horizontal" method="post">
                        <input type="hidden" name="token" />
                        <input type="hidden" name="ReturnUrl" value="@Request.QueryString["ReturnUrl"]" />
                        <div class="row-fluid">
                            <div class="control-group row-fluid">
                                <label class="control-label label-short" for="iptAccont">
                                    登录帐号</label>
                                <div class="controls controls-short">
                                    <input type="text" id="iptAccont" placeholder="example@gmail.com" name="username"
                                        av="{x:'$email',t:'errormsg',m:'请输入正确的email作为用户名', a:'show'}" class="span8" />
                                </div>
                            </div>
                            <div class="control-group row-fluid">
                                <label class="control-label label-short" for="iptPassword">
                                    登录密码</label>
                                <div class="controls controls-short">
                                    <input type="password" id="iptPassword" placeholder="登录密码" name="password" av="{x:':\\w{6,12}',t:'errormsg',m:'密码6-12位', a:'show'}"
                                        class="span8" />
                                </div>
                            </div>
                            <div class="control-group row-fluid">
                                <label class="control-label label-short" for="iptCheckCode">
                                    验证码</label>
                                <div class="controls controls-short">
                                    <div class="span5">
                                        <input type="text" id="iptCheckCode" placeholder="请输入验证码" name="validCode" av="{x:':\\w{4}',t:'errormsg',m:'验证码输入有误',a: 'show'}"
                                            maxlength="4" class="span12" />
                                    </div>
                                    <div id="codeimg" class="span3">
                                    </div>
                                </div>
                            </div>
                            <div class="control-group row-fluid">
                                <div class="controls controls-short">
                                    如果您没有帐号 <a href="/Account/Register">点击注册</a>
                                </div>
                            </div>
                            <div class="control-group row-fluid">
                                <div class="controls controls-short">
                                    忘记密码？<a href="/Account/ForgotPassword" class="alert-danger">请到这里找回</a>
                                </div>
                            </div>
                            <div class="control-group row-fluid">
                                <div class="controls controls-short">
                                    @if (ViewBag.Error == null)
                                    { 
                                        <span class="text-error" style="display: none;" id="errormsg"></span>
                                    }
                                    else
                                    { 
                                        <span class="text-error" id="errormsg">
                                            @ViewBag.Error
                                        </span> 
                                    }
                                </div>
                            </div>
                            <div>
                                <div class="controls controls-short">
                                    <input type="submit" class="btn btn-primary btn-large span4" style="" value="登 录" />
                                </div>
                            </div>
                        </div>
                        </form>
                    </fieldset>
                </div>
            </div>
        </div>
        <div class="span3">
            <div class="mini-layout">
                @RenderPage("/Views/Shared/Partial/_Quiklinks.cshtml")
                <div class="hspace10">
                </div>
                <div class="hspace15">
                </div>
                @RenderPage("/Views/Shared/Partial/_NewJournals.cshtml")
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript">
        var validation = new plug.BindValidCode();
        $(function () {
            validation.BindValidator();
            new plug.AValidator().BuildValidate('loginform');
        });
        function Refalsh(sender) {
            validation.Refalsh(sender);
        }
    </script>
}
